import request from '@/utils/request'

// 查询学生成绩列表
export function listScore(query) {
  return request({
    url: '/stu/score/list',
    method: 'get',
    params: query
  })
}

// 查询学生成绩详细
export function getScore(id) {
  return request({
    url: '/stu/score/' + id,
    method: 'get'
  })
}


// 查询学生成绩详细
export function lessonScoreTable(id,type) {
    return request({
        url: '/stu/score/lessonScoreTable/' + id+'/'+type,
        method: 'get'
    })
}


// 查询学生成绩详细
export function calcLessonPointTarget(id) {
    return request({
        url: '/stu/score/calcLessonPointTarget/' + id,
        method: 'get'
    })
}



// 查询学生成绩详细
export function calcStudentRadio(id) {
    return request({
        url: '/stu/score/calcStudentRadio/' + id,
        method: 'get'
    })
}

// 查询学生成绩详细
export function getStudentTarget(id) {
    return request({
        url: '/stu/score/getStudentTarget/' + id,
        method: 'get'
    })
}


// 新增学生成绩
export function addScore(data) {
  return request({
    url: '/stu/score',
    method: 'post',
    data: data
  })
}

// 修改学生成绩
export function updateScore(data) {
  return request({
    url: '/stu/score',
    method: 'put',
    data: data
  })
}

// 删除学生成绩
export function delScore(id) {
  return request({
    url: '/stu/score/' + id,
    method: 'delete'
  })
}
